package com.ruibang.glass.material.component;

import com.ruibang.glass.material.service.SalverGlassDataSync;
import com.teaming.cloud.framework2.elastic.job3.annotation.ElasticJobScheduler;
import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @program: glass
 * @description: 半成品查询玻璃ID数据任务
 * @author: wujie
 * @create: 2024-03-15 17:02
 * //
 */
@Component
@ElasticJobScheduler(cron = "0 0/3 * * * ?") //每3分钟执行一次
public class SyncGlassDataTask implements SimpleJob {

    @Autowired
    private SalverGlassDataSync salverGlassDataSync;

    @Override
    public void execute(ShardingContext shardingContext) {
        salverGlassDataSync.sync("20");
    }
}
